package com.hkd.base_service.api;

import com.hkd.base_service.api.dto.AreaUploadDTO;
import com.hkd.base_service.api.fallback.AreaServiceImplFallback;
import com.hkd.base_service.api.vo.AreaGetVo;
import com.hkd.common.api.ApiResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author HKD
 * @date 2022/9/11 1:37
 */
@FeignClient(name = "base-service",
        contextId = "AreaService",
        fallbackFactory =  AreaServiceImplFallback.class
)
public interface AreaService{
    @PostMapping("uploadArea")
    ApiResponse uploadArea(@RequestParam("curUserId")String curUserId, @RequestBody List<AreaUploadDTO> uploadDTOS);

    @GetMapping("getAll")
    ApiResponse<List<AreaGetVo>> getAll(@RequestParam(value = "areaCode",required = false) String areaCode);
}
